package com.neusoft.npi.todo.npitodo.entity;

import lombok.Getter;

@Getter
public enum ResultCode {
    SUCCESS(200, "success"),
    NOT_LOGIN(401, "请先登录"),
    NOT_AUTHORIZED(403, "您没有权限访问"),
    NOT_FOUND(404, "您访问的资源不存在"),
    LOGID_IN_FREE(410, "此Logid不存在，您可以注册"),
    LOGIN_PASSWORD_ERROR(411, "密码错误"),
    TOKEN_INVALID(412, "token无效"),
    INSERT_FAIL(550, "数据插入失败"),
    DELETE_FAIL(551, "根据主键删除数据失败"),
    UPDATE_FAIL(552, "根据主键查询后，修改数据失败");
    //       INTERNAL_SERVER_ERROR(500);
    public int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
